@extends('layout.admin.index')

@section('content')
<div class="panel admin-panel margin-top">
	<div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加内容</strong></div>
	<div class="body-content">
	    <form method="post" class="form-x" action="/admin/commodity/config/update">
			<!-- 隐藏域发送csrf保护 -->
			{{ csrf_field() }}
			<!-- csrf保护结束 -->
			<!-- 隐藏域发送需要修改的id -->
			<input type="hidden" name="id" value="{{ $id }}">
	      	<div class="form-group">
		      	<div class="label">
		          	<label>上级分类：</label>
		        </div>
		        <div class="field">
		          	<select name="goods_config_sort" class="input w50">
		            	<option value="0">请选择分类</option>
		            	<!-- 遍历分类列表数据库中的分类 -->
						@foreach($data as $key =>$value)
		            	<option value="{{ $value['id'] }}" @if($value['id'] == $info['goods_config_sort']) selected @endif>{{ $value['goods_config_cate'] }}</option>
						@endforeach
						<!-- 分类列表遍历结束 -->
		          	</select>
		        	
		        </div>
	      	</div>
			
			<div class="form-group">
		      	<div class="label">
		          	<label>选择配置信息</label>
		        </div>
		        <div class="field">
		          	<select name="goods_config_name" class="input w50">
		            	<option value="0">选择所属配置信息</option>
		            	<option value="goods_config_cpu" @if($info['goods_config_name'] == 'goods_config_cpu') selected @endif>CPU类</option>
		            	<option value="goods_config_cpu_brand" @if($info['goods_config_name'] == 'goods_config_brand') selected @endif>CPU厂家</option>
		            	<option value="goods_config_cpu_series" @if($info['goods_config_name'] == 'goods_config_series') selected @endif>CPU系列</option>
		            	<option value="goods_config_cpu_core" @if($info['goods_config_name'] == 'goods_config_cpu_core') selected @endif>CPU核心数</option>
		            	<option value="goods_config_cpu_clock" @if($info['goods_config_name'] == 'goods_config_cpu_clock') selected @endif>CPU频率</option>
		            	<option value="goods_config_cpu_type" @if($info['goods_config_name'] == 'goods_config_cpu_type') selected @endif>CPU型号</option>
		            	<option value="goods_config_cpu_ddr" @if($info['goods_config_name'] == 'goods_config_cpu_ddr') selected @endif>CPU代数</option>
		            	<option value="goods_config_disk" @if($info['goods_config_name'] == 'goods_config_disk') selected @endif>硬盘类</option>
		            	<option value="goods_config_disk_brand" @if($info['goods_config_name'] == 'goods_config_disk_brand') selected @endif>硬盘厂家</option>
		            	<option value="goods_config_disk_kind" @if($info['goods_config_name'] == 'goods_config_disk_kind') selected @endif>硬盘种类</option>
		            	<option value="goods_config_disk_size" @if($info['goods_config_name'] == 'goods_config_disk_size') selected @endif>硬盘大小</option>
		            	<option value="goods_config_gpu" @if($info['goods_config_name'] == 'goods_config_gpu') selected @endif>显卡类</option>
		            	<option value="goods_config_gpu_brand" @if($info['goods_config_name'] == 'goods_config_gpu_brand') selected @endif>显卡厂家</option>
		            	<option value="goods_config_gpu_type" @if($info['goods_config_name'] == 'goods_config_gpu_type') selected @endif>显卡型号</option>
		            	<option value="goods_config_gpu_ddr" @if($info['goods_config_name'] == 'goods_config_gpu_ddr') selected @endif>显卡代数</option>
		            	<option value="goods_config_gpu_size" @if($info['goods_config_name'] == 'goods_config_size') selected @endif>显卡显存</option>
		            	<option value="goods_config_mainborad" @if($info['goods_config_name'] == 'goods_config_mainborad') selected @endif>主板类</option>
		           		<option value="goods_config_mainborad_brand" @if($info['goods_config_name'] == 'goods_config_mainborad_brand') selected @endif>主板厂家</option>
		           		<option value="goods_config_mainborad_type" @if($info['goods_config_name'] == 'goods_config_mainborad_type') selected @endif>主板型号</option>
		           		<option value="goods_config_ram" @if($info['goods_config_name'] == 'goods_config_ram') selected @endif>内存类</option>
		           		<option value="goods_config_ram_ddr" @if($info['goods_config_name'] == 'goods_config_ram_ddr') selected @endif>内存代数</option>
		           		<option value="goods_config_ram_brand" @if($info['goods_config_name'] == 'goods_config_ram_brand') selected @endif>内存厂家</option>
		           		<option value="goods_config_ram_size" @if($info['goods_config_name'] == 'goods_config_ram_size') selected @endif>内存大小</option>
	
		          	</select>
		        	
		        </div>
	      	</div>

	      	<div class="form-group">
		        <div class="label">
		          	<label>分类名称：</label>
		        </div>
		        <div class="field">
		          	<input type="text" class="input w50" name="goods_config_cate" value="{{ $info['goods_config_cate'] }}"/>
		          	<div class="tips"></div>
		        </div>
	      	</div>
		    <div class="form-group">
			    <div class="label">
			     	<label></label>
			    </div>
			    <div class="field">
			      	<button class="button bg-main icon-check-square-o" type="submit"> 修改</button>
			    </div>
		    </div>
	    </form>
	  </div>
</div>


@endsection